/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Br.Com.Cds.Academia.DAO;

import java.sql.*;
import javax.swing.JOptionPane;
import oracle.jdbc.pool.OracleConnectionPoolDataSource;
import oracle.jdbc.pool.OracleDataSource;

/**
 *
 * @author Anatólio Pinheiro
 */
public class AcessoOracle {
    
    private static Connection con;
    private static String url;
    private static String user;
    private static String password;
    
    public void conectar(){
        
       url = new String("jdbc:oracle:thin@localhost");
       user = new String("system");
       password = new String("4c3ss0");
       
       try{
           OracleDataSource ds = new OracleDataSource();
           ds.setURL(url);
           ds.getConnection(user,password);
           con = ds.getConnection(user,password);
       }catch(Exception e){
           JOptionPane.showMessageDialog(null,"Ocorreu um erro:"+ e.getMessage());
           
       }
    }
    
    
    
}
